/* GroupChat 组件样式 */
.group-info {
  font-size: 12px;
  color: #666;
  margin-left: 10px;
}

.no-messages {
  text-align: center;
  color: #999;
  padding: 40px 20px;
  font-size: 14px;
}

.sender-name {
  font-size: 12px;
  color: #666;
  margin-right: 8px;
}

.message-info {
  display: flex;
  align-items: center;
  margin-top: 4px;
  font-size: 11px;
  color: #999;
}

.message.sent .message-info {
  justify-content: flex-end;
}

.message.received .message-info {
  justify-content: flex-start;
}

/* 发送按钮样式 */
.send-btn {
  background: #667eea;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
}

.send-btn:hover {
  background: #5a6fd8;
}

.send-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* 输入区域样式 */
.message-input {
  padding: 15px;
  border-top: 1px solid #e0e0e0;
  background: white;
}

.input-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.input-field {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.input-field:focus {
  border-color: #667eea;
}

.button-container {
  display: flex;
  align-items: center;
}

/* 加载状态样式 */
.loading {
  text-align: center;
  color: #666;
  padding: 40px 20px;
  font-size: 14px;
}

/* 输入状态指示器 */
.typing-indicator {
  font-size: 12px;
  color: #999;
  margin-left: 10px;
  font-style: italic;
}

.user-info {
  display: 'flex';
  border: '1px soild black';
}

/* .username {
  background-color: #5a6fd8;
}

.group-info {
  background-color: #666;
} */

.username1 {
  display: flex;
}

/* 头部布局样式 */
.dhat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px;
  border-bottom: 1px solid #e0e0e0;
  background: white;
}

.back-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: #666;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.back-btn:hover {
  background-color: #f0f0f0;
}

.user-info {
  flex: 1;
  margin: 0 15px;
}

/* 三个点按钮样式 */
.three-dots-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: #666;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.three-dots-btn:hover {
  background-color: #f0f0f0;
}

/* 群成员弹窗样式 */
.members-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.members-modal {
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.members-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.members-modal-header h3 {
  margin: 0;
  font-size: 18px;
  color: #333;
}

.close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.close-btn:hover {
  background-color: #f0f0f0;
}

.members-list {
  max-height: 60vh;
  overflow-y: auto;
  padding: 0;
}

.member-item {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s;
}

.member-item:hover {
  background-color: #f8f9fa;
}

.member-item:last-child {
  border-bottom: none;
}

.member-avatar {
  width: 40px;
  height: 40px;
  margin-right: 15px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.member-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.default-avatar {
  width: 100%;
  height: 100%;
  background-color: #667eea;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: bold;
}

.member-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.member-name {
  font-size: 16px;
  color: #333;
  margin-bottom: 4px;
}

.member-role {
  font-size: 12px;
  color: #667eea;
  background-color: #f0f8ff;
  padding: 2px 8px;
  border-radius: 10px;
  align-self: flex-start;
}

/* 移除成员按钮样式 */
.remove-member-btn {
  background: #ff4757;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
  margin-left: auto;
}

.remove-member-btn:hover:not(:disabled) {
  background: #ff3742;
  transform: translateY(-1px);
}

.remove-member-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

.remove-member-btn:active:not(:disabled) {
  transform: translateY(0);
}

/* 系统消息样式 */
.system-message {
  display: flex;
  justify-content: center;
  margin: 10px 0;
}

.system-message-text {
  background-color: #f0f0f0;
  color: #666;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 12px;
  text-align: center;
  max-width: 80%;
  word-wrap: break-word;
}

/* 响应式样式 */
@media (max-width: 768px) {
  .members-modal {
    width: 95%;
    max-height: 85vh;
  }

  .members-modal-header {
    padding: 15px;
  }

  .members-modal-header h3 {
    font-size: 16px;
  }

  .member-item {
    padding: 12px 15px;
  }

  .member-avatar {
    width: 35px;
    height: 35px;
    margin-right: 12px;
  }

  .member-name {
    font-size: 14px;
  }

  .member-role {
    font-size: 11px;
    padding: 1px 6px;
  }

  .system-message-text {
    font-size: 11px;
    padding: 4px 10px;
  }
}

/* 撤回消息相关样式 - 像时间分隔符一样居中显示 */
.time-separator .recall-text {
  color: #999;
  font-size: 12px;
  font-style: italic;
}

.time-separator .re-edit-btn {
  margin-left: 8px;
  background: #007bff;
  color: white;
  border: none;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.time-separator .re-edit-btn:hover {
  background: #0056b3;
}

.re-edit-btn {
  background: #007bff;
  color: white;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.re-edit-btn:hover {
  background: #0056b3;
}

.message-actions {
  position: absolute;
  top: -8px;
  right: -8px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s;
}

.message:hover .message-actions {
  opacity: 1;
}

.recall-btn {
  background: #dc3545;
  color: white;
  border: none;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.recall-btn:hover {
  background: #c82333;
}
